Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Html content



  Understand diff in Unix

diff is an important tool program in Unix. It is used to compare differences of two files, it is the foundation for code version control. If you type : $ diff <file_before_change> <file_after_change> diff will tell you what's the difference between these two files. The result may not be so easy to understand, so now I will show you how to understand diff. 1. 3 formats of diff diff has 3 formats due to historic reasons. normal diff context diff unified diff 2. Demo files For easy d...

   diff,Unix,version control,git     2012-09-03 10:49:36

  Another Chinese Siri : Baidu launched phone voice assistant

Today, Baidu launched their own phone voice assistant "Baidu voice assistant Baidu claims it as the first apply the depth neural network (DNN) to speech recognition products in China, it reduces recognition error rate by 25%.Similar to other voice assistants, Baidu voice assistant can be roughly divided into the function of the phone calls, information querying and voice communication. Users can use voice to make phone call, send SMS and set the alarm etc. Similarly, Baidu voice assistant suppo...

   Baidu voice assisstant, Google Now, Apple Siri     2012-12-25 02:16:27

  Best Rich Text Editors ready to use in web projects

This post illustrates five interesting rich text editors ready to use in your web projects. I also provided some guidelines regarding how to implement them on your pages using a few lines of HTML code. Try them!1. Yahoo! UI Library: Rich Text EditorThe Yahoo! Rich Text Editor is a UI control that replaces a standard HTML textarea and is based on Yahoo! UI Library; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like...

   RTE,Example,Project,Open Source,Best,Sim     2011-07-27 10:57:33

  Update parent window after closing the window opened by window.open()

Imagine we have a webpage which has a text field to let user enter a date. Usually, we may create a calendar window to ask the user to pick one date from the calendar window, when the date is picked, the calendar window will close and the date picked will be put into the text field. This way involves the window.open() method in JavaScript, and we may think how the opened window knows its parent window and then updates the parent window. I give a simple demo on this.We have two pages, on is the p...

   window.open, JavaScript,update, return value     2012-06-23 01:36:32

  bash network interface

Some of us may have seen /dev/tcp/<host>/<port> before, is this a special file system implemented in some BSD kernel? Because there is no /dev/tcp in Linux. Actually, this one is implemented in bash. We no need to rely on wget,nc to do network connection. It's very easy to use this interface: bash-4.2$ cat </dev/tcp/time.nist.gov/13 56188 12-09-18 15:34:26 50 0 0 733.5 UTC(NIST) * bash-4.2$ exec 3<>/dev/tcp/www.w3.org/80 bash-4.2$ echo -e "GET / HTTP/1.0\n\n" >&3 b...

   Bash,Network interface,/dev/tcp     2013-07-20 00:57:52

  JavaScript's Two Zeros

JavaScript has two zeros: -0 and +0. This post explains why that is and where it matters in practice. The signed zero Numbers always need to be encoded to be stored digitally. Why do some encodings have two zeros? As an example, let’s look at encoding integers as 4-digit binary numbers, via the sign-and-magnitude method. There, one uses one bit for the sign (0 if positive, 1 if negative) and the remaining bits for the magnitude (absolute value). Therefore, -2 and +2 are encoded as f...

   JavaScript,zeros     2012-03-24 05:21:49

  Read 10 new books from O'Reilly for free

Recently O'Reilly provided free access to some books. Some of them are even in early release status. Here we recommend 10 of them. 1、Mastering Perl 2、Git Pocket Guide 3、Vagrant: Up and Running 4、High Performance Browser Networking 5、802.11ac: A Survival Guide 6、Test-Driven Development with Python 7、Interactive Data Visualization for the Web 8、HTML5 Canvas 9、Programming JavaScript Applications 10、Agile Data Source : http://linu...

   O'Reilly,Free book,Early release     2013-07-03 07:56:20

  GCC is compiled with C++ compiler

On 15 Aug, 2012, GCC merged a patch--Merge from cxx-conversion branch . This means GCC will be compiled with C++ compiler in the future, it also means that GCC will be implemented using C++. You may have following two puzzles: Why does GCC turn to C++? Without C++ compiler, how can we compile C++ codes? Why using C++? In GNU's C++ Conversion, we can find this description in the background section: Whether we use C or C++, we need to try to ensure that interfaces are easy to understan...

   GCC,C++,Compiler     2012-09-04 02:36:06

  Microsoft's next generation OS Windows Blue may be free

In PC era, Microsoft is the world's largest software service provider, its revenue  is mainly from selling operating systems and other software services.With the advent of the era of mobile Internet, the free software service concept has been widely accepted, Microsoft has been forced to explore new business models.According to ZDNet, Microsoft's next-generation OS Windows Blue is expected to be released in mid of 2013. The biggest difference between the new version of the OS and the previ...

   Windows Blue, Pirce, Free     2012-11-29 10:54:15

  Differences among Enter,F5 and Ctrl+F5 in webpage refresh

When we press Enter, F5 or Ctrl+F5 to refresh a webpage, is there any difference among them? Actually it's yes, we can find the difference from the request header and response header information. There are two cases about pressing Enter in the address bar. First if the page requested is cached and not expired in the browser, we can find the header information sent by the browser is : Host 192.168.3.174:8080 User-Agent Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0 Accept ...

   Refresh,F5,Ctrl+F5     2013-06-13 22:03:35